﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace StudentManagement.DAL
{
    public class LoginData
    {
        public bool CheckLogin(string usename, string password)
        {
            string querySql = $"select count(1) from UseDto where Account='{usename}' and Password='{password}'";
            int res = Convert.ToInt32(SQLHelper.ExecuteScalar(CommandType.Text,querySql));
            if (res == 1)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
